package com.example.module_c;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class Hospital extends AppCompatActivity implements View.OnClickListener {

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_hospital);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });
        findViewById(R.id.ll_shouye).setOnClickListener(this);
        findViewById(R.id.ll_quanbufuwu).setOnClickListener(this);
        findViewById(R.id.ll_qingnianyizhan).setOnClickListener(this);
        findViewById(R.id.ll_gerenzhongxin).setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {
        if (view.getId() == R.id.ll_shouye){
            Intent intent = new Intent(Hospital.this,Module_c.class);
            startActivity(intent);
        }if (view.getId() == R.id.ll_quanbufuwu){
            Intent intent = new Intent(Hospital.this,Serve.class);
            startActivity(intent);
        }if (view.getId() == R.id.ll_qingnianyizhan){
            Intent intent = new Intent(Hospital.this,Teenager.class);
            startActivity(intent);
        }if (view.getId() == R.id.ll_gerenzhongxin){
            Intent intent = new Intent(Hospital.this,People.class);
            startActivity(intent);
        }
    }
}